<script setup lang="ts">
import {historyData} from "@/examples/history/data.ts";

type Activities = {
  version: string;
  timestamp: string;
  content: string;
  list: {
    title: string;
    content: string;
    type: 'bug' | 'optimization' | 'add' | 'remove' | 'update' | 'fix';
  }[];
}

const activities: Activities[] = historyData;
</script>

<template>
  <el-timeline>
    <el-timeline-item
        v-for="(item, index) in activities"
        :key="index"
        :timestamp="item.timestamp"
        placement="top"
    >
      <el-card>
        <h4>{{ item.version }}</h4>
        <p>{{ item.content }}</p>
        <ul>
          <li style="margin-bottom: 10px;" v-for="tips in item.list" :key="tips.content">{{ tips.content }}</li>
        </ul>
      </el-card>
    </el-timeline-item>
  </el-timeline>
</template>

<style scoped>

</style>
